import {http} from '../http';
import apis from '../apiList';

const _HTTP = new http();
/**
 * 注册、登录、找回密码
 * @returns {Promise<unknown>}
 */
export const loginAndRegister = function (data) {
    return _HTTP.request({
        method: "POST",
        url: "/member/login",
        data: data,
    })
}

/**
 * 退出登录
 * @param data
 * @returns {Promise | Promise<unknown>}
 */
export  const loginOut =function (data) {
    return _HTTP.request({
        method: "POST",
        url: "/login/logout",
        data: data
    })
}
/**
 * 找回密码
 * @param data
 * @returns {Promise | Promise<unknown>}
 */
export const retrievePassword =function (data) {
    return _HTTP.request({
        method:'POST',
        url: '/member/ChangePass',
        data:data
    })
}


export const getLoginSendcode =function (data) {
    return _HTTP.request({
        method: 'POST',
        url: '/login/sendcode',
        data: data
    })
}